<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <title>eBPLS Business Permit and Licensing System</title>
        <meta name="Author" content=" FourJ's ">
        <link href="includes/eBPLS.css" rel="stylesheet" type="text/css">
<title></title>
</head>
<body>
<form action='index.php?part=4&class_type=Preference&selMode=<?php echo $selMode;?>&action_=8&itemEvent=1&data_item=0&orderbyasde=1&com=<?php echo $com;?>&saveyes=<?php echo $saveyes;?>' method="post" name='_FRM'>
<input type=hidden name=bbo value="<?php echo $bbo;?>">
<input type=hidden name=com value="<?php echo $com;?>">
<input type=hidden name=saveyes value="<?php echo $saveyes;?>">
<script language='Javascript' src='javascripts/default.js'></script>
<script language="Javascript">
function confdel(cc)
{
         var _FRM = document._FRM;
        doyou = confirm("Record Will Be Deleted, Continue?");
        if (doyou==true) {
                _FRM.bcode.value = cc;
               _FRM.confx.value = 1;
        } else {
                _FRM.confx.value=0;
                return false;
        }
                _FRM.submit();
               return true;
}
</script>
<input type=hidden name=confx value='<?php echo $confx; ?>'>
<input type=hidden name=part value="<?php echo $part;?>">
<input type=hidden name=class_type value="<?php echo $class_type;?>">
<input type=hidden name=selMode value="<?php echo $selMode;?>">
<input type=hidden name=action_ value="<?php echo $action_;?>">
<input type=hidden name=itemEvent value="<?php echo $itemEvent;?>">
<input type=hidden name=bcode value="<?php echo $bcode;?>">
<table border=0 width=100% align=center cellspacing=0 cellpadding=0>
<tr>
<td colspan=2 align=center>
</td>
</tr>
<tr><td colspan=2 ><br></td></tr>
<tr><td colspan=2 ><br></td></tr>
                <tr width=100%>
                        <td> &nbsp </td>
                </tr>
                <tr width=100%>
                        <td> &nbsp </td>
                </tr>
                <?php
                if ($prefm<>'Province') {
                ?>
                <tr width=100%>
                        <td align=right valign=top> <?php echo $prefut; ?> Name : </td>
			<td align=left valign=top> &nbsp 
		<?php
                        $selectupper = mysql_query("select * from $prefu order by $prefdc $ascdesc");
                        if ($prefm=='District' or $prefm=='Zip') {
                                $selectpref = mysql_query("select lguname from ebpls_buss_preference");
                                $selectpref = mysql_fetch_row($selectpref);
                                $kyeme = ',b.city_municipality_desc ';
                                $kyemet = ','.$prefu.' b where a.upper=b.city_municipality_code';
                                $deductme = 6;
                                $sep = '--';
                        } else {
                                $selectpref='';
                                $kyeme = '';
                                $kyemet = '';
                                $deductme=6;
                                if ($prem=='Province') {
                                        $sep = '';
                                } else {
                                        $sep = '--';
                                }
                        }
                        if ($selectpref2<>'') {
                                $selectpref[0]=$selectpref2;
                        }
                        if ($prefut=='LGU') {
                                $ddt=5;
                        } else {
                                $ddt = 6;
                        }
			print "<select maxlength=255 name=sname class=text180 >";
                        while ($selectupper1 = mysql_fetch_row($selectupper)) {
				echo $selectupper[$ddt];
				$selectupper1[$ddt] = strtoupper($selectupper1[$ddt]);
				$lgunameas = $selectupper1[1]."-".$selectupper1[$ddt];
                                if ($selectupper1[0]==$selectprefup) {
				//echo $selectupper1[1].$selectpref[0];
                                                $slt = 'selected';
                                } else {
                                                $slt = '';
                                }
                        print"<option value='$selectupper1[0]' $slt>$lgunameas-$selectprefup</option>\n";
                        }
                        ?>
                        </select>
                        </td>
                        <td> &nbsp </td>
                </tr>
                <?php } ?>
                <tr width=90%>
                        <td align=right valign=top> <?php echo $prefm; ?> Name : </td>
                        <td align=left valign=top> &nbsp <input type=text maxlength=255 name=bname class=text180 value='<?php echo $bn; ?>'></td>
                        <td> &nbsp </td>
                </tr>
                <?php
                if ($prefm=='Barangay' || $prefm=='District') {
                ?>
                <tr width=90%>
                        <td align=right valign=top> BLGF Code : </td>
                        <td align=left valign=top> &nbsp <input type=text maxlength=255 name=blgf_codes class=text180 value='<?php echo $bn7; ?>'></td>
                        <td> &nbsp </td>
                </tr>
                <?php
                }
                ?>
                <tr width=90% cellspacing=2>
                                        <?php
                                        if ($prefm=='Barangay') {
                                                                                                 
                                                //$tsek='CHECKED'
                                        ?>
                                                                                                 
                                        <td align=right>
                                                &nbsp;
                                        </td>
                                        <td align=left>&nbsp; &nbsp;
                                                <input type=checkbox name=chk1 <?php echo $tsek;
?> > &nbsp; Garbage Zone <?php } ?>
                                        </td>
                </tr>
        </table>
        <table align=center border=0 cellspacing=0 cellpadding=0 width=90%>
                <tr width=90%>
                        <td align=center valign=top>
                        &nbsp</td>
                </tr>
                <tr width=90%>
                        <td align=center valign=top>
                        <input type=submit value=Submit name=sb>
                        <input type=Button value=Cancel onClick='history.go(-1);'>
                        <input type=Reset value=Reset>
                        &nbsp<br><br></td>
                </tr>
        </table>
<?php                                                                                                 
                require "refpage.php";
                                                                                                 
                                                                                                 
?>
                                                                                                 
                </tr>
        </table>
<tr>
<td colspan=2 align=center><br>
</td>
</tr>
                                                                                                 
</table>
                                                                                                 
                                                                                                 
</body>
</html>

